<div class="tests view">
<h2><?php  echo __('Test'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($test['Test']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Examinee'); ?></dt>
		<dd>
			<?php echo $this->Html->link($test['Examinee']['name'], array('controller' => 'users', 'action' => 'view', $test['Examinee']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Exam'); ?></dt>
		<dd>
			<?php echo $this->Html->link($test['Exam']['name'], array('controller' => 'exams', 'action' => 'view', $test['Exam']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Start Time'); ?></dt>
		<dd>
			<?php echo h($test['Test']['start_time']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('End Time'); ?></dt>
		<dd>
			<?php echo h($test['Test']['end_time']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Finish Time'); ?></dt>
		<dd>
			<?php echo h($test['Test']['finish_time']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Done Question Number'); ?></dt>
		<dd>
			<?php echo h($test['Test']['done_question_number']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Score'); ?></dt>
		<dd>
			<?php echo h($test['Test']['score']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Is Completed'); ?></dt>
		<dd>
			<?php echo h($test['Test']['is_completed']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Is Qualified'); ?></dt>
		<dd>
			<?php echo h($test['Test']['is_qualified']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Is Published'); ?></dt>
		<dd>
			<?php echo h($test['Test']['is_published']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Created'); ?></dt>
		<dd>
			<?php echo h($test['Test']['created']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Updated'); ?></dt>
		<dd>
			<?php echo h($test['Test']['updated']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Is Passed'); ?></dt>
		<dd>
			<?php echo h($test['Test']['is_passed']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Test'), array('action' => 'edit', $test['Test']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Test'), array('action' => 'delete', $test['Test']['id']), null, __('Are you sure you want to delete # %s?', $test['Test']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Tests'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Test'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Exams'), array('controller' => 'exams', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Exam'), array('controller' => 'exams', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Examinee'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Test Questions'), array('controller' => 'test_questions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Test Question'), array('controller' => 'test_questions', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Test Questions'); ?></h3>
	<?php if (!empty($test['TestQuestion'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Test Id'); ?></th>
		<th><?php echo __('Original Qid'); ?></th>
		<th><?php echo __('Order Number'); ?></th>
		<th><?php echo __('Input Type'); ?></th>
		<th><?php echo __('Question'); ?></th>
		<th><?php echo __('Option Choices'); ?></th>
		<th><?php echo __('Answer'); ?></th>
		<th><?php echo __('User Choice'); ?></th>
		<th><?php echo __('Score'); ?></th>
		<th><?php echo __('Created'); ?></th>
		<th><?php echo __('Updated'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($test['TestQuestion'] as $testQuestion): ?>
		<tr>
			<td><?php echo $testQuestion['id']; ?></td>
			<td><?php echo $testQuestion['test_id']; ?></td>
			<td><?php echo $testQuestion['original_qid']; ?></td>
			<td><?php echo $testQuestion['order_number']; ?></td>
			<td><?php echo $testQuestion['input_type']; ?></td>
			<td><?php echo $testQuestion['question']; ?></td>
			<td><?php echo $testQuestion['option_choices']; ?></td>
			<td><?php echo $testQuestion['answer']; ?></td>
			<td><?php echo $testQuestion['user_choice']; ?></td>
			<td><?php echo $testQuestion['score']; ?></td>
			<td><?php echo $testQuestion['created']; ?></td>
			<td><?php echo $testQuestion['updated']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'test_questions', 'action' => 'view', $testQuestion['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'test_questions', 'action' => 'edit', $testQuestion['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'test_questions', 'action' => 'delete', $testQuestion['id']), null, __('Are you sure you want to delete # %s?', $testQuestion['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Test Question'), array('controller' => 'test_questions', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
